package com.java.service.impl;


import com.java.dao.UsersDao;
import com.java.dao.impl.UsersDaoImpl;
import com.java.domain.Users;
import com.java.service.UsersService;

import java.util.List;

public class UsersServiceImpl implements UsersService {
    private UsersDao usersDao = new UsersDaoImpl();
    @Override
    public boolean serveUser(Users users) {
        return usersDao.addUsers(users)>0;
    }

    @Override
    public Users login(Users users) {
        return usersDao.queryUser(users);
    }

    //查询用户
    @Override
    public List<Users> selectuser() {
        return usersDao.Selectuser();
    }

    //删除用户
    @Override
    public int delUsers(String uName) {
        return usersDao.delUsers(uName);
    }
}
